package com.weixing.mall.provider.controller.act;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.weixing.mall.base.wrapper.Result;
import com.weixing.mall.base.wrapper.ResultUtil;
import com.weixing.mall.core.support.BaseController;
import com.weixing.mall.provider.model.domain.SeckillImport;
import com.weixing.mall.provider.service.ISeckillImportService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @ClassName ActivityController
 * @Description 活动controller
 * @Author Small
 * @Date 2019/10/16 15:27
 * @Version 1.0
 **/
@RestController
@RequestMapping("act/seckill")
@Api(value = "活动模块API", tags = "秒杀活动订单导入查看")
public class SeckillImportController extends BaseController {

    @Autowired
    private ISeckillImportService seckillImportService;


    @ApiOperation(value = "加载导入列表")
    @GetMapping("{actId}")
    public Result list(@PathVariable Long actId) {
        QueryWrapper wrapper = new QueryWrapper<SeckillImport>().eq("act_id", actId);
        IPage page = seckillImportService.page(initMPage(), wrapper);
        return ResultUtil.success(page);
    }

}
